package com.example.springboot_rabbitmq.controller;

import com.example.springboot_rabbitmq.direct.MessageServiceRabbitmqDirectImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: 史炜立
 * @description: TODO
 * @date: 2023/3/27 15:47
 */
@RestController
@RequestMapping("/direct")
public class DirectController {
    @Resource
    private MessageServiceRabbitmqDirectImpl messageServiceRabbitmqDirect;

    @GetMapping("/sned")
    public String sendMess(@RequestParam String id){
        messageServiceRabbitmqDirect.sendMessage(id);
        return "success";
    }


}
